package com.woniu.microworkorderserver.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * 消息队列监控
 */
@Component
public class MsgQueueListener {

    @RabbitHandler
    @RabbitListener(queues = {"msg.queue"})
    public void handler(String msg){
        //处理消息
        System.out.println("OrderQueueListener=====" + msg);
    }
}
